//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "adminActions\fn_destroy.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_params","_caller_name","_caller_uid","_vehicle_varname","_action","_authorized","_vehicle"];
PARAMS_3(_params,_caller_name,_caller_uid);

_authorized = _params select 0;
_action = _params select 1;
_vehicle = _params select 2;
_vehicle_varname = _params select 3;
_player_name = _params select 4;

if (isNil "_vehicle") exitWith {ERROR("Nil variable");};
if (isNull _vehicle) exitWith {ERROR("Null variable");};
if (isServer) then {
	TLOG_1("DESTROY",_this);
	if (local _vehicle) then {
		_vehicle setDamage 1.1;
	};
};
if (!isDedicated) then {
	if (local _vehicle) then {
		_vehicle setDamage 1.1;
	};
};

TRACE("End");
TMFPROFILERSTOP;
